<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>vue2</title>
	</head>
	<body>
		<div id="demo1">
			<p>Hello</p>
			<div>{{message1}}</div>
			<button type="button" v-on:click="test1()">打招呼</button>
			<button type="button" @click="test2()">隐藏</button>
			
		</div>
		<div id="demo2">
			<p>{{message2}}</p>
			<!-- model 双向绑定, .lazy惰性加载 鼠标失去焦点数据开始生效 -->
			<input type="text" v-model.lazy="message2"/>
		</div>
	</body>
</html>
<script src="js/vue.js"></script>
<script type="text/javascript">
	var v1=new Vue({
		el:"#demo1",
		data:{
			message1:""
		},
		methods:{
			test1(){
				this.message1="寒冷"
			},
			test2(){
				this.message1=""
			}
		}
	});
	
	var v2=new Vue({
		el:"#demo2",
		data:{
			message2:"Hello"
		},
		methods:{
			
		}
	});
	
</script>